package vip.xiaonuo.smzq.modular.kcl.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import vip.xiaonuo.smzq.modular.kcl.entity.Zl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 矿山质量 Mapper
 *
 * @author eomer
 * @since 2024-02-22
 */
@Mapper
public interface ZlMapper extends BaseMapper<Zl> {
      @Select("select  CONCAT (kslx,'*',kspj) FROM kcl_zl WHERE (kqbh = #{kqbm} AND djflbh = #{djflbm} AND nd = #{nd}) GROUP BY kslx,kspj,djflbh")
    List<String> getList(@Param("kqbm") String kqbm,@Param("djflbm") Integer djflbm,@Param("nd") Integer nd);
    //查询当前矿当前年度的矿石种类
    @Select("select kslx from kcl_zl where kqbh=#{kqbm} and djflbh=#{djflbm} and nd=#{nd} GROUP BY kslx")
    List<Integer> getZllxList(@Param("kqbm") String kqbm, @Param("djflbm")Integer djflbm, @Param("nd")Integer nd);
    //查询当前矿当前年度的矿石种类
    @Select("select kslx from kcl_zl where kqbh=#{kqbm} and nd=#{nd} GROUP BY kslx")
    List<Integer> getZllxListNoDjflbm(@Param("kqbm") String kqbm,  @Param("nd")Integer nd);


}
